//
//  OneSellfirstTableViewCell.m
//  CarHome
//
//  Created by 王建男 on 14-9-24.
//  Copyright (c) 2014年 WJN_work@163.com. All rights reserved.
//

#import "OneSellfirstTableViewCell.h"
#import "DealerDetailModel.h"

@implementation OneSellfirstTableViewCell

- (void)dealloc
{
    [_label_Name release];
    [_label_minprice release];
    _label_Name = nil;
    _label_minprice = nil;
    [super dealloc];
}

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        // Initialization code
        [self creatTableView];
        [self setBackgroundColor:[UIColor clearColor]];
    }
    return self;
}

- (void)creatTableView
{
    UIView *views = [[UIView alloc] initWithFrame:CGRectMake(0, 170, self.frame.size.width, 60)];
    [views setBackgroundColor:[UIColor whiteColor]];
    [self addSubview:views];
    
    
    _label_Name = [[UILabel alloc] initWithFrame:CGRectMake(10, 150, views.frame.size.width -10, 20)];
    _label_Name.textColor = [UIColor whiteColor];
    [_label_Name setBackgroundColor:[UIColor clearColor]];
    [_label_Name setFont:[UIFont systemFontOfSize:13]];
    [self addSubview:_label_Name];
    
    _label_minprice = [[UILabel alloc] initWithFrame:CGRectMake(10, 10, 180, 40)];
    _label_minprice.textColor = myColor_dark;
    [_label_minprice setBackgroundColor:[UIColor clearColor]];
    [_label_minprice setFont:[UIFont systemFontOfSize:15]];
    [views addSubview:_label_minprice];
    
    UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
    [button setFrame:CGRectMake(0, 0, self.frame.size.width, 230)];
    [self addSubview:button];
    
    [views release];
}



- (void)setdealer:(DealerDetailModel *)derail
{
    [_label_Name setText:[NSString stringWithFormat:@"%@/%@", derail.car_body, derail.car_speed]];
    [_label_minprice setText:[NSString stringWithFormat:@"%@  %@",@"全国最低价", derail.car_minprice]];
    
}

- (void)awakeFromNib
{
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
